package com.neu.yishu.controller;

import com.neu.yishu.model.UserInfo;
import com.neu.yishu.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserInfoController {
    @Autowired
    UserInfoService userInfoService;

    @GetMapping("/user")
    public Object selectAll() {
        return userInfoService.selectAll();
    }

    @PostMapping("/userSignUp")
    public void signUp(@RequestBody UserInfo userInfoInfo) {
        System.out.println(userInfoInfo);
    }
}
